import {
  wxRequest
} from '@/utils/wxRequest';

let env = "-test" //-dev 或者 -test
const apiMusic = 'http://neteasemusic.leanapp.cn'

//热门歌单分类
const hotList = (params) => wxRequest(params, `${apiMusic}/playlist/hot`)

/* //根据ID获取歌曲详情
const hotList = (params)=>wxRequest(params,`${apiMusic}/playlist/detail`)

//根据ID获取播放歌曲
const hotList = (params)=>wxRequest(params,`${apiMusic}/music/url`)

//根据ID获取歌词
const hotList = (params)=>wxRequest(params,`${apiMusic}/lyric`) */

//根据ID歌曲详情
// const hotList = (params)=>wxRequest(params,`${apiMusic}/playlist/detail`)

//随机推荐音乐
// const randomList = (params) => wxRequest(params, `https://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?
// g_tk=5381&uin=0&format=json&inCharset=utf-8&outCharset=utf-8¬ice=0&platform=h5&needNewCode=1&tpl=3&page
// =detail&type=top&topid=36&_=1520777874472
// `)
const qq = {
    randomUrl() {
      return `https://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?
  g_tk=5381&uin=0&format=json&inCharset=utf-8&outCharset=utf-8¬ice=0&platform=h5&needNewCode=1&tpl=3&page
  =detail&type=top&topid=36&_=1520777874472
  `
    },
    detailUrl(id) {
      console.log(id)
      return `http://ws.stream.qqmusic.qq.com/C100${id}.m4a?fromtag=0&guid=126548448`
    },
    randomList(params) {
      return wxRequest(params, `https://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?
g_tk=5381&uin=0&format=json&inCharset=utf-8&outCharset=utf-8¬ice=0&platform=h5&needNewCode=1&tpl=3&page
=detail&type=top&topid=36&_=1520777874472
`)
    },
    getDetail(params,id) {
      return wxRequest(params, `http://ws.stream.qqmusic.qq.com/C100${id}.m4a?fromtag=0&guid=126548448`)
  }

}


export default {
  // randomList,
  qq
}
